package com.dhcc.bpm.modules.system.service.impl;

import com.dhcc.bpm.modules.system.service.ILogApiService;
import com.dhcc.bpm.modules.system.service.ILogErrorService;
import com.dhcc.bpm.modules.system.service.ILogService;
import com.dhcc.bpm.modules.system.service.ILogUsualService;
import lombok.AllArgsConstructor;
import org.springblade.core.log.model.LogApi;
import org.springblade.core.log.model.LogError;
import org.springblade.core.log.model.LogUsual;
import org.springframework.stereotype.Service;

/**
 * @ClassName LogServiceImpl
 * @Description  服务实现类
 * @Author sjm
 * @Date 2020/2/21 0021 15:16
 * @Version V1.0
 * @Copyright: 2020 东华软件 . All rights reserved.
 **/
@Service
@AllArgsConstructor
public class LogServiceImpl implements ILogService {

	ILogUsualService usualService;
	ILogApiService apiService;
	ILogErrorService errorService;

	/**
	 * 保存通用日志
	 * @Author sjm
	 * @Date 19:11 2020/2/21 0021
	 * @param log
	 * @return java.lang.Boolean
	 **/
	@Override
	public Boolean saveUsualLog(LogUsual log) {
		return usualService.save(log);
	}

	/**
	 * 保存操作日志
	 * @Author sjm
	 * @Date 19:12 2020/2/21 0021
	 * @param log
	 * @return java.lang.Boolean
	 **/
	@Override
	public Boolean saveApiLog(LogApi log) {
		return apiService.save(log);
	}

	/**
	 * 保存错误日志
	 * @Author sjm
	 * @Date 19:12 2020/2/21 0021
	 * @param log
	 * @return java.lang.Boolean
	 **/
	@Override
	public Boolean saveErrorLog(LogError log) {
		return errorService.save(log);
	}

}
